<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="lib/axios.min.js"></script>
</head>
<body>
<script>
    axios.get('http://localhost:3000/adata')
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
    axios.get('http://localhost:3000/axios?id=123')
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
    axios.get('http://localhost:3000/axios/123')
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
    axios.get('http://localhost:3000/axios',{
        params:{
            id:951
        }
    })
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })


    axios.delete('http://localhost:3000/axios?id=123')
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
    axios.delete('http://localhost:3000/axios/123')
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
    axios.delete('http://localhost:3000/axios',{
        params:{
            id:444
        }
    })
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })


    axios.post('http://localhost:3000/axios',{
        uname:'lisi',
        pwd:1235
    })
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })

    var params=new URLSearchParams()
    params.append('uname','zhangsan')
    params.append('pwd','66666')
    axios.post('http://localhost:3000/axios',params)
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })



    axios.put('http://localhost:3000/axios/1',{
        uname:'lisi',
        pwd:1235
    })
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })

    var params=new URLSearchParams()
    params.append('uname','zhangsan')
    params.append('pwd','66666')
    axios.put('http://localhost:3000/axios/55',params)
        .then(function (ret) {
            console.log(ret)
            console.log(ret.data)
        })
</script>
</body>
</html>